import { ScriptNodeConfType } from '../types'
import { ScriptNodeStatusConst } from '../consts'

/**
 * 生成一个各配置项为空的脚本节点配置对象
 *
 * @returns {ScriptNodeConfType} 脚本节点配置对象
 */
export const genScriptNodeConf = (): ScriptNodeConfType => {
  return {
    id: '',
    type: 'custom',
    position: {
      x: 0,
      y: 0
    },
    data: {
      status: ScriptNodeStatusConst.Normal,
      label: '',
      cmd: '',
      start: false,
      end: false,
      color: '',
      executing: false
    },
    script: ''
  }
}
